package cn.kgc.smbms.controll;

import cn.kgc.smbms.pojo.Role;
import cn.kgc.smbms.service.RoleService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/role/")
public class RoleController {
    @Resource
    private RoleService roleService;
    //查询全部role信息
    public String getAllRoleList(Model model){
        List<Role> roleList=null;
        roleList=roleService.selectRoleList();
        model.addAttribute("roleList",roleList);
        return "userlist";
    }
}
